package cn.iocoder.yudao.module.system.controller.app.merchant.vo;

import cn.iocoder.yudao.framework.common.validation.InEnum;
import cn.iocoder.yudao.module.system.enums.merchant.MerchantIdentity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @author 梁富贵
 * @Date 2024/10/18
 **/
@Schema(description = "商户申请 Request VO")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class BusinessBaseApplicationReqVO {
    @Schema(description = "商户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
    @NotNull
    @NotEmpty
    @Size(max = 255)
    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z0-9_]+$")
    private String merchantName;

    @Schema(description = "法人姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
    @NotNull
    @NotEmpty
    private String legalRepresentative;

    @Schema(description = "联系电话", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
    @Size(min = 11, max = 11, message = "联系电话必须为11位数字")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "联系电话格式不正确")
    private String contactPhone;

    @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
    private String remarks;

    @Schema(description = "注册商家类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
    @NotNull
    @Size(min = 1, max = 1)
    @InEnum(value = MerchantIdentity.class)
    private Integer identify;

    @Schema(description = "身份证照片", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
    @NotNull
    private String identifyCard;


}
